package com.grapecity.control.listview.item;

import java.util.ArrayList;

public class CircleItem {
	public static final int TYPE_TXT = 0x00000001;
	public static final int TYPE_TXT_IMG = 0x00000002;
	public static final int TYPE_TXT_LINK = 0x00000004;

	private String imgHeader;
	private String txtName;
	private String content;
	private String[] imgContent;
	private String link;
	private String txtTime;
	private ArrayList<String> likes = new ArrayList<String>();
	private ArrayList<CircleComment> comments = new ArrayList<CircleComment>();

	private int type = 0;

	public CircleItem(String imgHeader, String txtName, String content, String[] imgContent, String link, String time) {
		this.imgHeader = imgHeader;
		this.txtName = txtName;
		this.content = content;
		this.txtTime = time;
		if (!this.content.isEmpty()) {
			this.type |= TYPE_TXT;
		}
		this.imgContent = imgContent;
		if (this.imgContent.length > 0) {
			this.type |= TYPE_TXT_IMG;
		}
		this.link = link;
		if (!this.link.isEmpty()) {
			this.type |= TYPE_TXT_LINK;
		}
	}

	public String getImgHeader() {
		return imgHeader;
	}

	public String getTxtName() {
		return txtName;
	}

	public String getContent() {
		return content;
	}

	public String[] getImgContent() {
		return imgContent;
	}

	public String getLink() {
		return link;
	}

	public String getTxtTime() {
		return txtTime;
	}

	public int getType() {
		return type;
	}

	public ArrayList<CircleComment> getComments() {
		return comments;
	}

	public ArrayList<String> getLikes() {
		return likes;
	}

	public boolean hasComment() {
		return comments.size() > 0;
	}

	public boolean hasLike() {
		return likes.size() > 0;
	}
}
